import { Resource, Behavior } from '../schema';
import Preview from '../../preview/web';
import { DnFC, DroppableWidget } from '@inbiz/react';
const SearchResultEngine: DnFC<any> = (props) => {
  return <Preview {...props} />;
};

SearchResultEngine.Resource = Resource;
SearchResultEngine.Behavior = Behavior;

SearchResultEngine['Plugin'] = (props: any) => {
  const { align, direction, className } = props;
  return (
    <DroppableWidget
      className={`searchResultEngine-PluginBox ${className || ''}`}
      style={{
        flexDirection: direction || 'row',
        justifyContent: align || 'flex-start',
        alignItems: align || 'flex-start',
      }}
    >
      {props.children}
    </DroppableWidget>
  );
};

SearchResultEngine['RightPlugin'] = (props: any) => {

  return (
    <DroppableWidget>
      {props.children}
    </DroppableWidget>
  );
};
SearchResultEngine['CenterPlugin'] = (props: any) => {
  const { align, direction, className } = props;
  return (
    <DroppableWidget
      className={`searchResultEngine-CenterPlugin ${className || ''}`}
      style={{
        flexDirection: direction || 'row',
        justifyContent: align || 'flex-start',
        alignItems: align || 'flex-start',
        display: 'flex'
      }}
    >
      {props.children}
    </DroppableWidget>
  );
};
export default SearchResultEngine;
